import worker, { MessageEvents } from '@ohos.worker';
import { post100kFile } from '../common/PostAndGetFiles'

let parentPort = worker.workerPort; // 获取parentPort属性

// 接收宿主线程的数据
parentPort.onmessage = async (e: MessageEvents) => { // 定义onmessage方法
  let data: ESObject = e.data
  //console.log(TAG,"onmessageData333")
  const newData = await post100kFile()

  parentPort.postMessage(data) // 返回值
}
